<!DOCTYPE html>
<html>
<head>
<meta content="text/html" charset="UTF-8">
<title>微信管理平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="css/themes/default/easyui.css">
<link rel="stylesheet" href="css/themes/icon.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var $login_win=$('#login_win');
	var $login_form=$('#login_form');
	$login_win.dialog({
		height:180,
		width:260,
	    resizable:true,
	    closable:false,
	    title:'用户登陆',
	    buttons:[
	        {
	        	iconCls:'icon-add',
	        	text:'登陆',
	        	handler:function(){
	        		if($login_form.form('validate')){
	        			var datas=$login_form.serializeArray()
	        			$.post('login.json',datas,function(data){
	        				if(data.success){
	        		        	window.location.href=data.msg;
	        		        }else{
	        		        	$.messager.alert('提示',data.msg,'error');
	        		        }
	        			},'json');
	        		}
	        	}
	        },
	        {
	        	iconCls:'icon-cancel',
	        	text:'重置',
	        	handler:function(){
	        		$login_form.form('clear');
	        	}
	        }
	    ]
	});
	
});
</script>
</head>
<body>
	<div id="login_win" style="padding: 10px;margin: 0 auto">
		<form id="login_form" method="post">
			<table>
				<tr>
					<td>用户名</td>
					<td><input class="easyui-textbox" name="username" data-options="required:true" /></td>
				</tr>
				<tr>
					<td>密码</td>
					<td><input class="easyui-textbox" name="password" data-options="required:true" /></td>
				</tr>
				<tr>
					<td>验证码</td>
					<td><input class="easyui-textbox" name="va" data-options="required:true,width:80" /></td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>